home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / planner / sys / storeplan.c < prev   
Encoding:
C/C++ Source or Header  |  1992-08-27  |  1.4 KB  |  73 lines

  1. /*     
  2.  *      FILE
  3.  *         storeplan
  4.  *     
  5.  *      DESCRIPTION
  6.  *         Routines to store and retrieve plans
  7.  *
  8.  *      IDENTIFICATION
  9.  *      $Header: /private/postgres/src/planner/sys/RCS/storeplan.c,v 1.11 1991/02/05 15:50:02 sp Exp $
  10.  *     
  11.  */
  12.  
  13. #include "tmp/postgres.h"
  14.  
  15. #include "rules/params.h"
  16. #include "utils/log.h"
  17. #include "utils/palloc.h"
  18.  
  19. #include "nodes/nodes.h"
  20. #include "nodes/pg_lisp.h"
  21.  
  22. /*-------------------------------------------------
  23.  *
  24.  * StringToPlan
  25.  *     given a string (generated by "PlanToString")
  26.  *     reconstruct the plan (or any (?) other LispValue
  27.  *     structure).
  28.  */
  29. LispValue
  30. StringToPlan (string)
  31.     char *string;
  32. {
  33.     extern LispValue lispReadString();
  34.     return(lispReadString(string));
  35.  
  36. }
  37.  
  38.  
  39. /*-------------------------------------------------
  40.  *
  41.  * StringToPlanWithParams
  42.  *     Same as StringToPlan, but it also returns
  43.  *     an array (of type ParamListInfo) of all the Param
  44.  *     nodes
  45.  */
  46. LispValue
  47. StringToPlanWithParams (string, paramListP)
  48.     char *string;
  49.     ParamListInfo * paramListP;
  50. {
  51.     extern LispValue lispReadStringWithParams();
  52.     return(lispReadStringWithParams(string, paramListP));
  53.  
  54. }
  55.  
  56.  
  57. /*--------------------------------------------------------------
  58.  *
  59.  * PlanToString
  60.  *
  61.  * Given a plan (a lisp list, i.e. a LispValue) transform it
  62.  * into a string.
  63.  */
  64. char *
  65. PlanToString(l)
  66. LispValue l;
  67. {
  68.     char *s;
  69.     s = lispOut(l);
  70.     return(s);
  71.  
  72. }
  73.